package com.dk.util.http.req;

import com.dk.domain.ApiAutoTestEntity;
import okhttp3.Response;

/**
 * 请求上下文
 */
public class ReqContext {
    //策略对象
    private ReqStrategy reqStrategy;

    public ReqContext(ReqStrategy reqStrategy){
        this.reqStrategy = reqStrategy;
    }

    /**
     * 执行请求
     * @param apiAutoTestEntity
     * @return
     */
    public Response doRequest(ApiAutoTestEntity apiAutoTestEntity){
        return reqStrategy.request(apiAutoTestEntity);
    }
}
